
import { Navigate } from "react-router-dom";
import React, { ReactNode } from "react";
interface AuthGuardProps {
    path: string;
    redirectPath?:string
}
const AuthGuard:React.FC<AuthGuardProps> = ({path,redirectPath = '/login'}) => {
    const isAuthenticated = false
    if(isAuthenticated) {
        return  <Navigate to={path}  replace />;
    }else {
        return <Navigate to={redirectPath}  replace />;
    }
    
}
export default AuthGuard
